//
//  SmsCloudPhoneAlertView.m
//  smsCloud
//
//  Created by 吴斌 on 2024/7/21.
//

#import "SmsCloudPhoneAlertView.h"
@interface SmsCloudPhoneAlertView()

@end
@implementation SmsCloudPhoneAlertView
-(instancetype)init{
    if (self == [super init]) {
        [self smsCloudInitView];
    }
    return self;
}
- (void)smsCloudInitView{
    UIImageView* smsCloudHeadImgView = [[UIImageView alloc] init];
    smsCloudHeadImgView.userInteractionEnabled = YES;
    smsCloudHeadImgView.image = [SmsCloudHead SmsCloudImageNamed:@"smsCloudPhoneAlert"];
    smsCloudHeadImgView.contentMode = UIViewContentModeScaleToFill;
    [self addSubview:smsCloudHeadImgView];
    [smsCloudHeadImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@([SmsCloudHead SmsCloudScreewRatio:32]));
        make.top.equalTo(@([SmsCloudHead SmsCloudScreewRatio:3]));
        make.width.equalTo(@([SmsCloudHead SmsCloudScreewRatio:34]));
        make.height.equalTo(@([SmsCloudHead SmsCloudScreewRatio:34]));
    }];
    UILabel * smsCloudHeadLab = [[UILabel alloc] init];
    smsCloudHeadLab.font = [UIFont systemFontOfSize:[SmsCloudHead SmsCloudScreewRatio:39] weight:UIFontWeightRegular];
    smsCloudHeadLab.textColor = [SmsCloudHead SmsCloudColorHexString:@"#222222"];
    smsCloudHeadLab.text = @"注意事项:";
    [self addSubview:smsCloudHeadLab];
    [smsCloudHeadLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(smsCloudHeadImgView.mas_right).offset([SmsCloudHead SmsCloudScreewRatio:3]);
        make.top.equalTo(@([SmsCloudHead SmsCloudScreewRatio:0]));
        make.height.equalTo(@([SmsCloudHead SmsCloudScreewRatio:39]));
    }];
    UIImageView* smsCloudContentImgView = [[UIImageView alloc] init];
    smsCloudContentImgView.userInteractionEnabled = YES;
    smsCloudContentImgView.image = [SmsCloudHead SmsCloudImageNamed:@"smsCloudContentIcon"];
    smsCloudContentImgView.contentMode = UIViewContentModeScaleToFill;
    [self addSubview:smsCloudHeadImgView];
    [self addSubview:smsCloudContentImgView];
    [smsCloudContentImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@([SmsCloudHead SmsCloudScreewRatio:79]));
        make.top.equalTo(smsCloudHeadLab.mas_bottom).offset([SmsCloudHead SmsCloudScreewRatio:15]);
        make.height.equalTo(@([SmsCloudHead SmsCloudScreewRatio:600]));
        make.width.equalTo(@([SmsCloudHead SmsCloudScreewRatio:640]));
    }];
}
@end
